package com.teamall.web.family.db.dao.mapper;

import com.teamall.web.family.db.arg.FamilyInfoArg;
import com.teamall.web.family.db.po.FamilyInfoPO;

import java.math.*;
import java.util.*;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.session.RowBounds;

public interface IFamilyInfoMapper {
    @Select("select family_id from FAMILY_INFO where aid_main_staff=#{userObjId}")
    Integer qryFamilyByUserObjId(Integer userObjId);

    List<Integer> countByArg(FamilyInfoArg arg);

    List<FamilyInfoPO> selectByArg(FamilyInfoArg arg);

    FamilyInfoPO selectByPrimaryKey(Integer id);

    List<FamilyInfoPO> selectByArgAndPage(FamilyInfoArg arg, RowBounds rowBound);

    int insert(FamilyInfoPO record);

    int insertSelective(FamilyInfoPO record);

    int insertBatch(@Param("list") List<FamilyInfoPO> records);

    int updateByArgSelective(@Param("record") FamilyInfoPO record,
            @Param("arg") FamilyInfoArg arg);

    int updateByArg(@Param("record") FamilyInfoPO record,
            @Param("arg") FamilyInfoArg arg);

    int updateByPrimaryKeySelective(FamilyInfoPO record);

    int updateByPrimaryKey(FamilyInfoPO record);
    
    int deleteByArg(FamilyInfoArg arg);
    
    int deleteByPrimaryKey(Integer id);
    
}